Shader "HPipeline/HBlinnPhong"
{
    Properties
    {
        _MainTex ("Texture", 2D) = "white" {}
        _Shininess("Shininess",Range(10,128)) = 50
        _SpecularColor("SpecularColor",Color) = (1,1,1,1)
        _Color("Color",Color) = (1,1,1,1)
    }
    SubShader
    {
        //Tags { "RenderType"="Opaque"  "LightMode"="HForwardBase"}
        Cull Off
        LOD 300

        Pass
        {

            Tags { "RenderType"="Opaque"  "LightMode"="HForwardBase"}

            HLSLPROGRAM
            #include "./BlinnPhongFrag.hlsl"

            #pragma vertex vert
            #pragma fragment frag
      
            ENDHLSL
        }

        Pass
        {
            Name "GBufferPass"
            Tags { "RenderType"="Opaque"  "LightMode"="HGBufferPass"}

            HLSLPROGRAM
            #include "../ShaderLibrary/GBuffer.hlsl"

            #pragma vertex vert
            #pragma fragment frag

            ENDHLSL
        }

        Pass
        {
            Tags { "RenderType"="Opaque"  "LightMode"="HVisibilityPass"}
            ZWrite On

            HLSLPROGRAM
            #pragma multi_compile_instancing
            #include "../ShaderLibrary/VBuffer/visibilityPass.hlsl"

            #pragma vertex vert
            #pragma fragment frag
      
            ENDHLSL
        }
    }
    Fallback "HUnlit"
}
